package com.upcode.weighing.common.constant;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class InspectConstants {

    public static Map<String,String> weekMap;

    public static List<String> week;

    static{
        weekMap = new HashMap<>();
        weekMap.put("1","周一");
        weekMap.put("2","周二");
        weekMap.put("3","周三");
        weekMap.put("4","周四");
        weekMap.put("5","周五");
        weekMap.put("6","周六");
        weekMap.put("7","周天");

        week = new LinkedList<>();
        week.add("1");
        week.add("2");
        week.add("3");
        week.add("4");
        week.add("5");
        week.add("6");
        week.add("7");
    }

    /**
     * 巡检任务循环类型： 0不循环 1 按周 2按隔天
     */
    public static final Integer TASK_TYPE_ZERO = 0;
    public static final Integer TASK_TYPE_ONE = 1;
    public static final Integer TASK_TYPE_TOW = 2;

    /**
     * 巡检任务循环隔天循环天数限制
     */
    public static final Integer MIN_DAY = 1;
    public static final Integer MAX_DAY = 365;

    /**
     * 巡检默认年月日(后续对比任务起止时间用)
     */
    public static final String DEFAULT_DAY = "2021-11-22";

    /**
     * 巡检默认起止时间
     */
    public static final String DEFAULT_START_TIME = "00:00";
    public static final String DEFAULT_END_TIME = "23:59";

    /**
     * 最小时间差
     */
    public static final Long MIN_MINUTES = 30L;

    /**
     * 相差0分钟
     */
    public static final Long  ZERO_MINUTES = 0L;

    /**
     * 线程数量
     */
    public static final Integer THREAD_NUM = 5;

    /**
     * 两点间最大距离
     */
    public static final Integer MAX_DISTANCE = 500;

    /**
     * 任务截至时间允许的最大宽限时间（单位：分钟）
     */
    public static final Integer END_GRACE_TIME = 30;

    /**
     * 巡检状态（0待巡检 1已完成 2顺序错误）
     */
    public static final Integer INSPECT_STATUS_ZERO = 0;
    public static final Integer INSPECT_STATUS_ONE = 1;
    public static final Integer INSPECT_STATUS_TOW = 2;
}
